Technical Q&A QA1092
Displaying Java compiler errors in Japanese


Q: Why do compiler errors appear garbled in Project Builder when I try to compile my Java code on Mac OS X 10.1 with the primary language set to Japanese?

A: When your primary language preference is set to Japanese, the javac compiler will attempt to return compiler errors in Japanese. Unfortunately, Project Builder cannot handle the default encoding used for Japanese compiler errors and they will appear garbled or Project Builder may appear to hang.

In order to display compiler errors in Japanese, you can add the following flags to your Java project to change the default text encoding to Unicode.

For javac:

1) Open your project and select the "Build Settings" pane under "Targets"

2) Scroll to the "Build Settings" list at the bottom of the pane

3) Create a build setting whose name/value pair is "JAVA_COMPILER_FLAGS" and "-J-Dfile.encoding=UTF8"

For jar:

1) Open your project and select the "Build Settings" pane under "Targets"

2) Scroll to the "Build Settings" list at the bottom of the pane

3) Create a build setting whose name/value pair is "OTHER_JARFLAGS" and "-J-Dfile.encoding=UTF8"

A future version of Project Builder will automatically append these flags.


[Nov 08 2001]


Developer Documentation | Technical Notes | Development Kits | Sample Code